package database;

//		this handles and saves the current user and accounts
public class ModelClass {
	User currentUser;
	Account currentAccount;
	DatabaseConnector databaseConnector;

	/**
	 * @param accountType
	 */

	public ModelClass() {
		databaseConnector = new DatabaseConnector();
	}

	/**
	 * Sets the current user so only the logged in user only can see his/shes
	 * accounts
	 * 
	 * @param user
	 */
	public void setCurrentUser(User user) {
		this.currentUser = user;
	}

	public void setCurrentAccount(Account account) {
		this.currentAccount = account;
	}

	public DatabaseConnector getDatabaseConnector() {
		return databaseConnector;
	}

	public void setDbConnection(DatabaseConnector databaseConnector) {
		this.databaseConnector = databaseConnector;
	}

	public void setDatabaseConnector(DatabaseConnector databaseConnector) {
		this.databaseConnector = databaseConnector;

	}

	public User getCurrentUser() {
		return currentUser;
	}

	public Account getCurrentAccount() {
		System.out.println(currentAccount);
		return currentAccount;

	}
}